package com.neu.controller;

import com.neu.base.Result;
import com.neu.service.ProgressRecordService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/taskRecord")
@Tag(name = "任务进度管理")
public class ProgressRecordController {

    @Autowired
    private ProgressRecordService progressRecordService;

    @PostMapping("/findByTaskId")
    @Operation(summary = "根据任务id查询任务进度")
    //const res = await axiosInstance.post(`/taskRecord/findByTaskId?taskId=${taskId}`);
    public Result updateStatus(@RequestParam String taskId) {
        return progressRecordService.findByTaskId(taskId);
    }
}
